$(function(){
	
	//createPlanStanderModel();
	//alert("start");
	loadEventDetail();
	
	
	/*
	 * 显示事件详情
	 */
	function loadEventDetail(){
		var timestamp = Date.parse(new Date());
		url = "/ag/zrt/showEventDetail.action?ts="+timestamp;
		//alert("start");
		$.post(url,{},showDetail);
	}
	
	function showDetail(data){
		if(data.eventId != null){
			$('#eventId').text(data.eventId);
		}
		if(data.eventName != null){
			$('#eventName').text(data.eventName);
		}
		if(data.happenedTime != null){
			$('#happenedTime').text(data.happenedTime);
		}
		if(data.eventType != null){
			$('#eventType').text(data.eventType);
		}
		if(data.eventLevel != null){
			$('#eventLevel').text(data.eventLevel);
		}
		if(data.eventStatus != null){
			$('#eventStatus').text(data.eventStatus);
		}
		if(data.place != null){
			$('#place').text(data.place);
		}
		if(data.cause != null){
			$('#cause').text(data.cause);
		}
		if(data.eventDesc != null){
			$('#eventDesc').text(data.eventDesc);
		}
		if(data.measure != null){
			$('#measure').text(data.measure);
		}
		if(data.submiter != null){
			$('#submiter').text(data.submiter);
		}
		if(data.submitDept != null){
			$('#submitDept').text(data.submitDept);
		}
		if(data.source != null){
			$('#source').text(data.source);
		}
		if(data.death != null){
			$('#death').text(data.death);
		}
		if(data.injured != null){
			$('#injured').text(data.injured);
		}
		if(data.submitTime != null){
			$('#submitTime').text(data.submitTime);
		}
		if(data.submiterContact != null){
			$('#submiterContact').text(data.submiterContact);
		}
		if(data.accpetTime != null){
			$('#accpetTime').text(data.accpetTime);
		}
		if(data.accepter != null){
			$('#accepter').text(data.accepter);
		}
		
		if(data.teamLeader != null){
			$('#teamLeader').text(data.teamLeader);
		}
		if(data.commander != null){
			$('#commander').text(data.commander);
		}
		if(data.implementPlan != null){
			$('#implementPlan').text(data.implementPlan);
		}
		if(data.assistDept != null){
			$('#assistDept').text(data.assistDept);
		}
		if(data.viceCommander != null){
			$('#viceCommander').text(data.viceCommander);
		}
		if(data.content != null){
			$('#content').text(data.content);
		}
		if(data.time != null){
			$('#time').text(data.time);
		}
		if(data.leaderSuggestion != null){
			$('#leaderSuggestion').text(data.leaderSuggestion);
		}
//		alert("cc");
//		//if(data.planStanderList != null){
////			$.each(data.planStanderList,function(i,n){
////				alert(n.EEntry);
////			});
//			alert("cc");
		//}
		//createPlanStanderModel();
	}
	
	/*
	 * 复制预案标准模板
	 */
//	function createPlanStanderModel() {
//		var psModel = $('.planStanderdModel').clone();
//		$(psModel).show();
//		$('#planStanderdContainer').append(psModel);
//	}
});